package com.devops.admin.service;

import com.devops.admin.model.DOSExportDataJob;
import com.baomidou.mybatisplus.extension.service.IService;
import com.devops.admin.model.TableResult;
import com.devops.admin.po.DOSExportDataJobPo;
import com.devops.admin.vo.DOSPageVo;

/**
* @author Dell
* @description 针对表【dos_export_data_job(导出数据任务)】的数据库操作Service
* @createDate 2023-12-25 16:39:19
*/
public interface DOSExportDataJobService extends IService<DOSExportDataJob> {

    /**
     * checkAndCreate
     * @param exportDataJob 导出任务
     * @return java.lang.Boolean
     * @author jxt
     * @date 2023/12/25 17:04
     */
    Boolean checkAndCreate(DOSExportDataJob exportDataJob);

    /**
     * checkAndUpdate
     * @param exportDataJob 导出任务
     * @return java.lang.Boolean
     * @author jxt
     * @date 2023/12/25 17:05
     */
    Boolean checkAndUpdate(DOSExportDataJob exportDataJob);

    /**
     * execute
     * @param jobId 任务id
     * @return java.lang.Boolean
     * @author jxt
     * @date 2023/12/25 17:05
     */
    Boolean execute(Integer jobId);

    /**
     * getExportDataJobList
     * @param exportDataJob
     * @param pageVo
     * @return com.devops.admin.model.TableResult<com.devops.admin.po.DOSExportDataJobPo>
     * @author jxt
     * @date 2023/12/26 9:25
     */
    TableResult<DOSExportDataJobPo> getExportDataJobList(DOSExportDataJob exportDataJob, DOSPageVo pageVo);

    /**
     * getExportDataJobPoById
     * @param jobId 任务id
     * @return com.devops.admin.po.DOSExportDataJobPo
     * @author jxt
     * @date 2023/12/27 14:12
     */
    DOSExportDataJobPo getExportDataJobPoById(Integer jobId);

    /**
     * startOrPauseExportDataJob
     * @param jobId 任务id
     * @param active 是否启用
     * @return java.lang.Boolean
     * @author jxt
     * @date 2024/1/10 10:06
     */
    Boolean startOrPauseExportDataJob(Integer jobId, Boolean active);

    /**
     * stopAndRemove
     * @param jobId 任务id
     * @return java.lang.Boolean
     * @author jxt
     * @date 2024/10/14 14:41
     */
    Boolean stopAndRemove(Integer jobId);
}
